<template>
 <div style="margin:10px auto;">
  	<el-form ref="form" :model="formData" :rules="formRules" label-width="80px">
  	 <el-form-item label="活动名称">
      <el-input v-model="formData.title"></el-input>
  	 </el-form-item>
  	 <el-form-item label="活动区域">
      <el-select v-model="formData.province"  placeholder="请选择省份">
      	    <el-option
      v-for="item in provinceList"
      :key="item.value"
      :label="item.label"
      :value="item.value">
    </el-option>
      </el-select>
      <el-select v-model="formData.city"  placeholder="请选择城市">
      	    <el-option
      v-for="item in cityList"
      :key="item.value"
      :label="item.label"
      :value="item.value">
    </el-option>
      </el-select>
      <el-select v-model="formData.county"  placeholder="请选择县市">
      	    <el-option
      v-for="item in countyList"
      :key="item.value"
      :label="item.label"
      :value="item.value">
    </el-option>
      </el-select>
      <el-select v-model="formData.school"  placeholder="请选择学校">
      	    <el-option
      v-for="item in schoolList"
      :key="item.value"
      :label="item.label"
      :value="item.value">
    </el-option>
      </el-select>
  	 </el-form-item>
  	 <el-form-item label="活动时间">
    <el-date-picker
      v-model="formData.searchdate"
      type="daterange"
      range-separator="至"
      start-placeholder="开始时间"
      end-placeholder="结束时间">
    </el-date-picker>
  	 </el-form-item>
  	 <el-form-item label="活动状态">
    <el-radio-group v-model="formData.status" >
      <el-radio label="notstart" border>未开始</el-radio>
      <el-radio label="playing" border>进行中</el-radio>
      <el-radio label="end" border>已结束</el-radio>
      </el-radio-group>
  	 </el-form-item>  
  	 <el-form-item> 
  	 	<el-button type="primary" @click="submitQuery">查询</el-button>
  	 </el-form-item>
  	</el-form>
 </div>
</template>

<script>
	export default{
		name:"OrganizationSearch",
		props:{
			formData:{
				type:Object,
				default:()=>{
					return {}
				}
			},
			formRules:{
				type:Object,
				default:()=>{
					return {}
				}
			}
		},
		data(){
			return {
	    	provinceList:[{label:"湖南省",value:"湖南省"}],
	    	cityList:[{label:"湘西土家族苗族自治州",value:"湘西土家族苗族自治州"}],
	    	countyList:[{label:"吉首市",value:"吉首市"}],
	    	schoolList:[
	    	 {label:"第一中学",value:"第一中学"},
	    	 {label:"第二中学",value:"第二中学"},
	    	 {label:"第三中学",value:"第三中学"}
	    	],
			}
		},
		methods:{
			submitQuery(){
				this.$emit('submit-query',this.formData)
			}
		}
	}
</script>

<style>
</style>